Monte carlo simulation of cross dephasing events.


In [1]:
%pylab inline


Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].
For more information, type 'help(pylab)'.

In [364]:
def calculate_phase(t, FSS, phase = None):
    """ 
        Calculated the exciton - biexciton phase
    """
    
    if phase == None:
        phase = 0
    
    hbar = 6.56e-16 
    return np.exp((1.0j*(FSS*1e-6*t*1e-9 + phase))/hbar)

In [490]:
def phase_with_dephasing(xlifetime, crosstau, FSS):
    """
        Calculated the phase including dephasing.
    """
    
    t = np.linspace(0, xlifetime, 100)
    sin = []
    phase = 0
    dephasing_event = np.random.exponential(crosstau, 1)[0]    

    for i in xrange(t.size):
    
        p = calculate_phase(t[i], FSS, phase)
        sin.append(p)
        
        if t[i] > dephasing_event:

            if dephasing_event < xlifetime:   
                phase = np.random.random_sample()*1e-9
                dephasing_event += np.random.exponential(crosstau, 1)[0]        
                
    sin = np.array(sin)
    return sin[-1], sin

In [519]:
xtau = 1.
crosstau = 1.
FSS = 2.

In [525]:
xlifetime = np.random.exponential(1, 1)[0]
plt.figure(figsize = (16./1.5, 9./1.5))

t = np.linspace(0, xlifetime, 100)
plt.plot(t, phase_with_dephasing(xlifetime, crosstau, FSS)[1],'bo', markersize = 2)
plt.plot(t, phase_with_dephasing(xlifetime, 1e20, FSS)[1],'r--', markersize = 2)

plt.xlabel('$\\tau_x (ns)$', fontsize = 16) ; plt.ylabel('$Re(\\phi)$', fontsize = 16)
plt.xlim([0, xlifetime]) ; plt.ylim([-1.1, 1.1])
plt.legend(['No decoherence', 'With decoherence'])


Out[525]:
<matplotlib.legend.Legend at 0x1314ae210>

In [512]:
test_phases = np.array([phase_with_dephasing(xl, crosstau, 0)[0] for xl in np.random.exponential(xtau, 500)])

In [513]:
real_t_p = np.real(test_phases)
1.0 - float(real_t_p[real_t_p != 1.].size) / real_t_p.size


Out[513]:
0.518

In [514]:
ghv = 1./(1 + xtau / crosstau)
ghv


Out[514]:
0.5